package com.yonyougov.devops.cruxcisupport.backupuser;

import com.yonyougov.devops.cruxcisupport.backupuser.dto.IssuedTestRequestDto;
import com.yonyougov.devops.cruxcisupport.backupuser.dto.ProcessPermissionsDto;
import com.yonyougov.devops.fwc.core.service.BaseService;

import java.math.BigInteger;

/**
 * 备用测试人员 表服务
 */
public interface BackupTestUserService extends BaseService<BackupTestUserEntity, BigInteger> {
    //<!--用户自定义代码开始-->

    /**
     * 转测
     *
     * @param request [com.yonyougov.devops.cruxcisupport.backupuser.dto.IssuedTestRequestDto]
     * @return boolean
     */
    boolean issuedTestUsers(IssuedTestRequestDto request);

    /**
     * 查询提测单的测试人员
     * 条件: 提测单id
     *
     * @param commitTestId 提测单id
     * @return 测试人员昵称(多个使用逗号分割)
     */
    String findTestUserByCommitTestId(BigInteger commitTestId);

    /**
     * 检查身份为测试的用户是否具有操作提测单的权限
     *
     * @param processPermissionsDto com.yonyougov.devops.cruxcisupport.backupuser.dto.ProcessPermissionsDto
     * @return boolean
     */
    boolean processPermissions(ProcessPermissionsDto processPermissionsDto);
    //<!--用户自定义代码结束-->
}
